A non-volatile memory is an electronic memory that retains data when power is inactivated. A NAND flash memory is a favored non-volatile memory for storage media due to higher density, faster access time, and lower cost than other non-volatile memories. Techniques of manufacturing the non-volatile memory are not perfect, and as a result the non-volatile memory often has defective memory cells. Such defective memory cells are referred to as bad blocks. There is no way to repair the bad blocks after the non-volatile memory has been fabricated and the non-volatile memory is usually shipped with a bad-block marker indicating the defective memory cells. The bad-block marker is used by a host system to ensure that data is not written to or read from the bad blocks.
Pages in the non-volatile memory are partitioned into sub-pages of user bytes, out-of-band data bytes, and error correcting code (ECC) parity bytes. The bad-block marker is located in the out-of-band data bytes to mark the bad blocks. The user bytes, the out-of-band data bytes, and the ECC parity bytes are usually protected by error correcting codes. Partitioning in the non-volatile memory is usually performed to achieve low-latency decoding and minimum intermediate buffering. In existing methods of partitioning, pages in the non-volatile memory are partitioned into the sub-pages or ECC code words. An original location of the bad-block marker gets overwritten in such methods and the bad-block marker gets re-positioned within a page. Since the bad-block marker resides in a different position, re-building of a bad-block table becomes tedious and time-consuming as software requires distinguishing between used blocks and unused blocks in the non-volatile memory.
Hence, there is a need for an improved method of partitioning pages of an electronic memory into ECC code words in order to prevent the bad-block marker from being moved, and to allow immediate building and maintenance of the bad block table.